<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::middleware('auth:api')->get('/user', function (Request $request) {
    return $request->user();
});
//添加学校信息
Route::group(['namespace' => 'School'], function () {
    Route::match(['get', 'post'], '/addSchool', [ 'uses' => 'IndexController@addSchool']);//添加学校信息

//    Route::match(['get', 'post'], '/getBraceletMachineList', [ 'uses' => 'IndexController@getBraceletMachineList']);//获取手环列表
//    Route::match(['get', 'post'], '/getBraceletMachineInfo', [ 'uses' => 'IndexController@getBraceletMachineInfo']);//根据手环返回用户数据

});
//获取微信信息并保存
Route::group(['namespace' => 'User'], function () {
    Route::match(['get', 'post'], '/addInfo', [ 'uses' => 'UserController@addInfo']);//添加用户信息
    Route::match(['get', 'post'], '/login', [ 'uses' => 'UserController@login']);//简易登录校验
    Route::match(['get', 'post'], '/teacher/list', [ 'uses' => 'UserController@list']);//查看列表
    Route::match(['get', 'post'], '/teacher/editInfo', [ 'uses' => 'UserController@editInfo']); //修改数据

//    Route::match(['get', 'post'], '/getBraceletMachineList', [ 'uses' => 'IndexController@getBraceletMachineList']);//获取手环列表
//    Route::match(['get', 'post'], '/getBraceletMachineInfo', [ 'uses' => 'IndexController@getBraceletMachineInfo']);//根据手环返回用户数据

});
//根据手机号获取学校未完成学生的名单
Route::group(['namespace' => 'StudentInfo'], function () {
    Route::match(['get', 'post'], '/test', [ 'uses' => 'IndexController@planListTest']);//获取学校计划
    Route::match(['get', 'post'], '/planList', [ 'uses' => 'IndexController@planList']);//获取学校计划
    Route::match(['get', 'post'], '/getEvaluationProgress', [ 'uses' => 'IndexController@getEvaluationProgress']);//根据计划获取未完成名单
    Route::match(['get', 'post'], '/checkExportUnfinished', [ 'uses' => 'IndexController@checkExportUnfinished']);//获取要导出的地址
    Route::match(['get', 'post'], '/getBatchList', [ 'uses' => 'IndexController@getBatchList']);//获取学校复检计划
    Route::match(['get', 'post'], '/getRecheckRosterList', [ 'uses' => 'IndexController@getRecheckRosterList']);//获取学校复检计划下的复检名单
    Route::match(['get', 'post'], '/exportRecheckUnfinished', [ 'uses' => 'IndexController@exportRecheckUnfinished']);//下载学校复检计划下的复检名单


    Route::match(['get', 'post'], '/checkExportExceptionData', [ 'uses' => 'IndexController@checkExportExceptionData']); //导出未作答名单
//    getSectionList
    Route::match(['get', 'post'], '/getSectionList', [ 'uses' => 'IndexController@getSectionList']);//获取学校的学段
    Route::match(['get', 'post'], '/getGradeList', [ 'uses' => 'IndexController@getGradeList']);//获取学校的年级
    Route::match(['get', 'post'], '/getClassList', [ 'uses' => 'IndexController@getClassList']);//获取学校的年级

});